{% extends 'goods/base.html' %}
{% load static %}
{% block aa %}
	<div class="content inner">
		<section class="filter-section clearfix">
			<div class="filter-box" style="margin-top: 15px">
				<div class="all-filter">
					<div class="filter-value">
						<a href="{% url 'goods:item_sale_page' %}" class="sale-title active">满减专区</a>
						<a href="{% url 'goods:item_sale_page' %}" class="sale-title active">热卖专区</a>
						<a href="{% url 'goods:item_sale_page' %}" class="sale-title active">折扣专区</a>
					</div>
				</div>
			</div>
			<div class="sort-box bgf5">
				<div class="sort-text">排序：</div>
				<a href=""><div class="sort-text">销量 <i class="iconfont icon-sortDown"></i></div></a>
				<a href=""><div class="sort-text">评价 <i class="iconfont icon-sortUp"></i></div></a>
				<a href=""><div class="sort-text">价格 <i class="iconfont"></i></div></a>
				<div class="sort-total pull-right">共{{ length }}个商品</div>
			</div>
		</section>
		<section class="item-show__div clearfix">
			<div class="pull-left">
				<div class="item-list__area clearfix">
                    {% for good in page_obj %}
                        <div class="item-card">
						<a href="{% url 'goods:item_show' qid=good.id %}" class="photo">
							<img src="{{ good.image }}" alt="{{ good.name }}" class="cover">
							<div class="name">{{ good.name }}</div></a>
						<div class="middle">
							<div class="price"><small>￥</small>{{ good.price }}</div>
							<div class="sale no-hide"><a href="">满100减20</a></div>
						</div>
						<div class="buttom">
							<div>销量 <b>{{ good.code }}</b></div>
							<div>人气 <b>888</b></div>
							<div>评论 <b>{{ good.details }}</b></div>
						</div>
					</div>
                    {% endfor %}
				</div>
                <!-- 分页 -->
                <div class="page text-right clearfix" style="text-align: center">
                {% if page_obj.has_previous %}
                    <a href="{% url 'goods:item_sale_page'%}?page={{page_obj.previous_page_number}}" aria-label="Previous">
                        <span aria-hidden="true">&laquo;</span></a>
                {% endif %}
                    {% for foo in page_num %}
                        {% if foo == page_obj.number %}
                            <a href="{% url 'goods:item_sale_page' %}?page=1" aria-label="Previous" class="select">{{ foo }}</a>
                        {% else %}
                            <a href="{% url 'goods:item_sale_page' %}?page={{ foo }}">{{ foo }}</a>
                        {% endif %}
                {% endfor %}
                    {% if page_obj.has_next %}
                     <a href="{% url 'goods:item_sale_page' %}?page={{page_obj.next_page_number}}" aria-label="Next">
                          <span aria-hidden="true">&raquo;</span></a>
                  {% endif %}
            </div>
                </div>
			<div class="pull-right">
				<div class="desc-segments__content">
					<div class="lace-title">
						<span class="c6">爆款推荐</span>
					</div>
					<div class="picked-box">
                        {% for good in goodss %}
                            <a href="{% url 'goods:item_show' qid=good.id %}" class="picked-item"><img src="{{ good.image }}" alt="" class="cover"><span class="look_price">¥{{ good.price }}</span></a>
                        {% endfor %}
					</div>
				</div>
			</div>
		</section>
	</div>
{% endblock %}